﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Model.ProductHoliday>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Lib.Paging" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Thêm mới ngày lễ
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% if (ViewData["MessageInfo"] == null)
   {%>
<form action="/ProductHoliday/Create" method="post" name="adminForm", id="adminForm">
    <fieldset>
    <legend>Thêm mới dịp</legend>
    <font color="red">*</font> là trường bắt buộc phải nhập.
    <table width="100%" class="admintable">
        <body>
            <tr>
                <td class="key">Tên(<font color="red">*</font>)</td>
                <td><%=Html.TextBoxFor(m=>m.Name, new { @class = "required", style = "width:400px" })%></td>
            </tr>
            <tr>
                <td class="key">Độ ưu tiên</td>
                <td><%=Html.TextBoxFor(m=>m.Priority, new { @class = "required", style = "width:400px" })%></td>
            </tr> 
            <tr>
                <td align="center" colspan="2">
                    <input type="submit" id="btnsubmit" name="btnsubmit" value="Lưu" />
                </td>
            </tr>  
        </body>
    </table>
    </fieldset>
    </form>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#adminForm").validate({
                rules: {
                    Name: "required"
                },
                messages: {
                    Name: "Trường này là bắt buộc, vui lòng nhập dữ liệu!"
                }
            });
        });
    </script>
	<% }%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
<%=Html.Toolbar("Quay lại", "/ProductHoliday", "back")%>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
Thêm mới ngày lễ
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
<%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
